Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Bump Snaps packages #29275

Merged
merged 6 commits into from
Dec 20, 2024
Merged

chore: Bump Snaps packages #29275

merged 6 commits into from
Dec 20, 2024

Conversation

FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Dec 17, 2024

Description

Bump Snaps packages and handle any required changes.

Summary of Snaps changes:

  • Allow async initialization logic for Snap bundles
  • Add onSettingsPage export
  • Add Banner component
  • Support size prop on Button
  • Support fontWeight prop on Text
  • Add loading state for Button
  • Use BigInt for processing insight chain IDs

Open in GitHub Codespaces

Related issues

Closes MetaMask/snaps#2939
Closes MetaMask/snaps#2947
Closes MetaMask/snaps#2874
Closes MetaMask/snaps#2694

@metamaskbot metamaskbot added team-snaps-platform Snaps Platform team INVALID-PR-TEMPLATE PR's body doesn't match template labels Dec 17, 2024
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot
Copy link
Collaborator

Builds ready [2a0e83e]
Page Load Metrics (1809 ± 100 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14942091181720096
domContentLoaded14442050176620598
load149821091809208100
domInteractive23117342110
backgroundConnect9111472813
firstReactRender15102533215
getState588232110
initialActions01000
loadScripts10681602129618187
setupStore790202512
uiStartup171226672190275132
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 217 Bytes (0.00%)
  • ui: 2.77 KiB (0.03%)
  • common: 3.39 KiB (0.04%)

david0xd added a commit that referenced this pull request Dec 17, 2024
## **Description**
This PR enables loading button variant for Snaps UI.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28997?quickstart=1)

#### Notes
- Targets Snaps release integration PR:
#29275

## **Related issues**
Fixes: MetaMask/snaps#2694

## **Related PR dependencies**
Snaps monorepo: MetaMask/snaps#2930

## **Manual testing steps**
1. Create some example Snap for testing and add Snap UI Button with
`loading` variant.
Example: 
```TypeScript
<Button variant="loading">Loading button</Button>
```

## **Screenshots/Recordings**
### **Before**
Loading button variant was not available before.

### **After**

https://github.com/user-attachments/assets/5afea22c-1951-4475-a908-aa5b97eafb6b


## **Pre-merge author checklist**
- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
@metamaskbot
Copy link
Collaborator

Builds ready [70c7e35]
Page Load Metrics (1615 ± 63 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint22519211497436210
domContentLoaded14381902159412761
load14481909161513163
domInteractive237237189
backgroundConnect67826209
firstReactRender16108483316
getState46316189
initialActions01000
loadScripts9881407115411957
setupStore691162311
uiStartup163627041973281135
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 217 Bytes (0.00%)
  • ui: 3.03 KiB (0.04%)
  • common: 3.39 KiB (0.04%)

@FrederikBolding FrederikBolding marked this pull request as ready for review December 18, 2024 09:22
@FrederikBolding FrederikBolding requested review from a team as code owners December 18, 2024 09:22
david0xd
david0xd previously approved these changes Dec 18, 2024
Mrtenz
Mrtenz previously approved these changes Dec 20, 2024
FrederikBolding and others added 6 commits December 20, 2024 15:47
Add Snap UI Banner component.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29271?quickstart=1)

Fixes: MetaMask/snaps#2939

1. Install test Snap from the code example provided and check the
results.

Example Snap code with Banners in the UI:
```typescript
<Container>
  <Box>
    <Banner title="Success banner" severity="success">
      <Text>
        <Icon name="arrow-right" color="primary" size="inherit" />
        &nbsp;Here is the banner content!
      </Text>
      <Bold>Banner bold formatted text</Bold>
      <Italic>Banner italic formatted text</Italic>
      <Text>
        You can click here:&nbsp;
        <Link href="https://snaps.metamask.io/">Banner link</Link>
      </Text>
      <Button type="button">Banner Action Button</Button>
    </Banner>
    <Banner title="Info banner" severity="info">
      <Text>Here is the banner content!</Text>
    </Banner>
    <Banner title="Warning banner" severity="warning">
      <Text>Here is the banner content!</Text>
    </Banner>
    <Banner title="Danger banner" severity="danger">
      <Text>Here is the banner content!</Text>
    </Banner>
  </Box>
</Container>
```

Banner in Snap UI was not available before this PR. Nothing to show
here.

![Screenshot 2024-12-17 at 12 34
42](https://github.com/user-attachments/assets/bdf291be-b41b-4e0a-964c-218dbd2dae5e)

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
## **Description**
This PR enables loading button variant for Snaps UI.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28997?quickstart=1)

#### Notes
- Targets Snaps release integration PR:
#29275

## **Related issues**
Fixes: MetaMask/snaps#2694

## **Related PR dependencies**
Snaps monorepo: MetaMask/snaps#2930

## **Manual testing steps**
1. Create some example Snap for testing and add Snap UI Button with
`loading` variant.
Example: 
```TypeScript
<Button variant="loading">Loading button</Button>
```

## **Screenshots/Recordings**
### **Before**
Loading button variant was not available before.

### **After**

https://github.com/user-attachments/assets/5afea22c-1951-4475-a908-aa5b97eafb6b


## **Pre-merge author checklist**
- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
## **Description**

This PR adds a settings section for each preinstalled snaps that exposes
a `onSettingsPage` handler

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29234?quickstart=1)

## **Related issues**

Fixes: MetaMask/snaps#2874

## **Manual testing steps**

1. Open MetaMask's settings
2. You should see the preinstalled snaps settings

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**


### **After**


![image](https://github.com/user-attachments/assets/55f4027c-258e-4039-9006-95228cfdca3f)

![image](https://github.com/user-attachments/assets/e05e6964-ac61-49a1-bb28-e8d7d077dadc)

![image](https://github.com/user-attachments/assets/b2db7088-069a-4b83-9740-11f23f36e879)


## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
@metamaskbot
Copy link
Collaborator

Builds ready [242a6d2]
Page Load Metrics (1615 ± 52 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint14631861162510751
domContentLoaded14441844158610350
load14551865161510852
domInteractive23115482512
backgroundConnect783302211
firstReactRender1693352612
getState567212110
initialActions01000
loadScripts1053140411959244
setupStore67511157
uiStartup16702413195419393
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 217 Bytes (0.00%)
  • ui: 9.47 KiB (0.12%)
  • common: 4.64 KiB (0.06%)

@FrederikBolding FrederikBolding added this pull request to the merge queue Dec 20, 2024
Merged via the queue into main with commit 4e255c1 Dec 20, 2024
77 checks passed
@FrederikBolding FrederikBolding deleted the fb/snaps-bump-v81 branch December 20, 2024 16:00
@github-actions github-actions bot locked and limited conversation to collaborators Dec 20, 2024
@metamaskbot metamaskbot added the release-12.11.0 Issue or pull request that will be included in release 12.11.0 label Dec 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template release-12.11.0 Issue or pull request that will be included in release 12.11.0 team-snaps-platform Snaps Platform team
Projects
None yet
6 participants